package zyy;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

@Aspect
public class point {
    @Before("execution(* service.UserServiceImpl.*(..))")
    public void before(){
        System.out.println("-init-");
    }

    @After("execution(* service.UserServiceImpl.*(..))")
    public void after(){
        System.out.println("-destory-");
    }

    @Around("execution(* service.UserServiceImpl.*(..))")
    public void around(ProceedingJoinPoint jp) throws Throwable {
        System.out.println("Before arounde");
        System.out.println(jp.getSignature());

        Object proceed = jp.proceed();
        System.out.println("After Around");
        System.out.println(proceed);
    }
}
